<template>
  <div>
    <virtual-list :data="listItems" :item-height="30" containerHeight="500">
      <template #default="{ row }">
        <div class="item">
          <span>{{ row.text }}</span>
        </div>
      </template>
    </virtual-list>
  </div>
</template>

<script setup>
  // import { ref } from 'vue'
  // 导入组件
  import VirtualList from '@/components/Virtual.vue'
  const listItems = []
  for (let i = 0; i < 1000; i++) {
    listItems.push({ id: i, text: '大萨达撒打算' + (i + 1) })
  }
</script>
